package com.rabbitmqspringboot.listener;


import com.rabbitmqspringboot.constant.Constants;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class fanoutListener {

    @RabbitListener(queues = Constants.FANOUT_QUEUE1)
    public void fanout1(String message) {
        System.out.println("fanoutListener1接收到的消息是：" + message);
    }
    @RabbitListener(queues = Constants.FANOUT_QUEUE2)
    public void fanout2(String message) {
        System.out.println("fanoutListener2接收到的消息是：" + message);
    }


}
